
package com.youlai.boot.system.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.youlai.boot.system.model.bo.ArticleBO;
import com.youlai.boot.system.model.entity.Article;
import com.youlai.boot.system.model.form.ArticleForm;
import com.youlai.boot.system.model.query.ArticlePageQuery;
import com.youlai.boot.system.model.vo.ArticleVO;
import com.youlai.boot.system.model.vo.ArticlePageVO;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 文章分类业务接口
 *
 * @author haoxr
 * @since 2021/8/22
 */
//public interface ArticleService extends IService<Article> {
//    Page<ArticlePageVO> getArticlePage(ArticlePageQuery queryParams);
//}


/**
 * 用户分页列表
 *
 * @return
 */
public interface ArticleService extends IService<Article> {
    IPage<ArticlePageVO> listPagedArticles(ArticlePageQuery queryParams);
    IPage<ArticlePageVO> fllistPagedArticles(ArticlePageQuery queryParams);
    IPage<ArticlePageVO> keyWordsPagedArticles(ArticlePageQuery queryParams);
    /**
     * 新增用户
     *
     * @param articleForm 用户表单对象
     * @return
     */
    boolean saveArticle(ArticleForm articleForm);

    /**
     * 获取文章详情
     *
     * @param articleId 部门ID
     * @return 部门详情
     */
    ArticleVO getArticleForm(Long articleId);

    /**
     * 获取文章详情
     *
     * @param articleId 部门ID
     * @param flid
     * @return 部门详情
     */
    ArticleVO getArticlePrevData(Long articleId, int flid);
    ArticleVO getArticleNextData(Long articleId, int flid);
    List<ArticlePageVO> getRelateArticle(Long articleId, int flid);
    List<ArticlePageVO> getHotArticle(ArticlePageQuery queryParams);
    List<ArticlePageVO> getTjArticle();
    List<ArticleBO> getTjArticlev1();
    List<ArticlePageVO> getFlHotArticle(int flid);
    List<ArticlePageVO> getFlTjArticle(int flid);
    List<ArticlePageVO> getFlZxArticle(int flid);
    List<ArticlePageVO> getIndexHotArticle(int parent_id);

    /**
     * 修改用户
     *
     * @param articleId   用户ID
     * @param articleForm 用户表单对象
     * @return
     */
    boolean updateArticle(Long articleId, ArticleForm articleForm);


    /**
     * 删除用户
     *
     * @param idsStr 用户ID，多个以英文逗号(,)分割
     * @return
     */
    boolean deleteArticles(String idsStr);

    boolean viewArticle(Long articleId);

}

